ImageGear supports gamma correction preprocessing before the image is drawn onto the destination device. This operation does not affect the image itself, but only changes its appearance.
There are three options that allow you to control the gamma correction:
- RedLut (LPBYTE) - this is a 256-entry array of bytes that contains a new value for each of the possible 256 intensities of the red color.
- GreenLut (LPBYTE) - this is a 256-entry array of bytes that contains a new value for each of the possible 256 intensities of the green color.
- BlueLut (LPBYTE)- this is a 256-entry array of bytes that contains a new values for each of the possible 256 intensities of the blue color.
The default value for each of the three options is the identity array.
If the source image is not in the RGB color space, then it is first converted to the RGB color space, and then all the look-up tables are applied. |
The following are high-level options that automatically create all necessary look-up tables:
- Contrast, Brightness, Gamma (DOUBLE) - these three options are actually parameters that specify how to calculate the look-up tables to get the necessary color effects.
- Parameter Contrast - specifies the contrast level to produce. Values greater than 1.0 increase contrast; values less than 1.0 decrease contrast. Values less than 0.0 will invert contrast (exchange dark and light).
- Parameter Brightness - specifies the brightness adjustment. Possible values range from -255.0 to +255.0.
- Parameter Gamma - controls the non-linear contrast adjustment. Values greater than 1.0 increase contrast; values less than 1.0 decrease it. Usual range is from 1.8 to 2.2
The default values are:
- Contrast = 0.0,
- Brightness = 1.0,
- Gamma = 1.0